package org.sean.framework;

import org.springframework.boot.test.context.TestComponent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

@TestComponent
public class MyApplicationListener implements ApplicationListener<ApplicationEvent> {
    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {
        System.out.println("******");
        System.out.println("event : " + applicationEvent.toString());
        System.out.println("******");

        // org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent
        // org.springframework.boot.context.event.ApplicationStartedEvent
        // org.springframework.boot.context.event.ApplicationReadyEvent
    }
}
